#pragma once

#include <cstring>
#include <cstddef>
#include <stdint.h>

namespace hawking {
namespace indexlib {

class HashAlgorithm {
public:
    HashAlgorithm() = default;
    ~HashAlgorithm() = default;

public:
    static uint32_t HashString(const char *str, uint32_t dwHashType);
    static uint32_t HashString(const char *str, size_t size, uint32_t dwHashType);
    static uint64_t HashString64(const char *str);
    static uint64_t HashString64(const char *str, size_t size);
    static uint64_t HashNumber64(int32_t number);

public:
    // deprecated hash function, for it not produces hash value unifromly
    static uint64_t HashString64Deprecated(const char *str, uint32_t dwHashType);
    static uint64_t HashString64Deprecated(const char *str, size_t size, uint32_t dwHashType);
};

}
}
